import {createRouter, createWebHashHistory} from 'vue-router';

const Home = () => import('../views/home/Home.vue')
const Basic01 = () => import('../views/pages/Basic01.vue')
const Animation02 = () => import('../views/pages/Animation02.vue')
const DatGUI03 = () => import('../views/pages/DatGUI03.vue')
const DatGUI04 = () => import('../views/pages/DatGUI04.vue')
const PivotRotation05 = () => import('../views/pages/PivotRotation05.vue')
const DrawLine = () => import('../views/pages/DrawLine.vue')
const CreateText = () => import('../views/pages/CreateText.vue')
const ExternalModel = () => import('../views/pages/ExternalModel.vue')
const router = createRouter({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      meta: {title: '首页'}
    },
    {
      path: '/Basic01',
      name: 'Basic01',
      component: Basic01,
      meta: {title: '基础模型'}
    },
    {
      path: '/Animation02',
      name: 'Animation02',
      component: Animation02,
      meta: {title: '添加动画'}
    },
    {
      path: '/DatGUI03',
      name: 'DatGUI03',
      component: DatGUI03,
      meta: {title: 'DatGUI配置'}
    },
    {
      path: '/DatGUI04',
      name: 'DatGUI04',
      component: DatGUI04,
      meta: {title: 'DatGUI配置2'}
    },
    {
      path: '/PivotRotation05',
      name: 'PivotRotation05',
      component: PivotRotation05,
      meta: {title: '绕中心旋转'}
    },

    {
      path: '/DrawLine',
      name: 'DrawLine',
      component: DrawLine,
      meta: {title: '画线'}
    },
    {
      path: '/CreateText',
      name: 'CreateText',
      component: CreateText,
      meta: {title: '创建文字'}
    },
    {
      path: '/ExternalModel',
      name: 'ExternalModel',
      component: ExternalModel,
      meta: {title: '外部模型'}
    }

  ],
  history: createWebHashHistory()
})
export default router;
